#include "graph.h"
main()
{
 int i;
 ALGraph g;
 int sarray[20];

 CreateDG(&g);

 printf("\nDepth_First Search Traverse:");
 DFSTraverse(&g);

 printf("\nTopologicalSort:");
 if(TopologicalSort(&g,sarray))
 {
  for(i=0;i<g.vexnum;i++)
   printf("\n%d:%s",i,g.vertices[i].str);
 }
 else
  printf("This graph has a circle!");
}